home *** CD-ROM | disk | FTP | other *** search
- /* getdrive.c - function returns current drive number a=0,z=25 */
- #include <stddef.h>
- #include <dos.h>
- #define DEBUG 0
- int getdrive ( void )
- { int rc; char ltr;
- asm mov ah,19h ;
- asm int 21h ;
- asm mov ltr,al ;
- rc = (int) ltr;
- #if debug
- printf("GETDRIVE drive number = %d\n",rc);
- #endif
- return rc ;
- }